import {ElMessage} from "element-plus";

export default class Func {
    static clearObject = (obj) => {
        if (!obj || typeof obj !== 'object') return {};

        return Object.fromEntries(
            Object.entries(obj).filter(([_, v]) => (
                v !== '' && v !== null && v !== undefined
            ))
        );
    }

    static isEmpty = (obj) => {
        return obj === null || obj === '' || obj === undefined;
    }

    static queryFinish = () => {
        ElMessage.success('查询完成')
    }

    static refreshFinish = () => {
        ElMessage.success('刷新成功')
    }

}